﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ContractManager = BotonJXC.Entity.ContractManager;
using ContractManagerDAO = BotonJXC.DAO.ContractManagerDAO;
using NHibernate.Criterion;
using BotonJXC.Entity;
namespace BotonJXC.BLL
{
    public class ContractManagerBll : BaseBLL<ContractManagerDAO, ContractManager, int>
    {
        ContractManagerDAO contractDao = new ContractManagerDAO();

        public ContractManagerBll() { }

        public bool savePriceMaintenanc(ContractManager contractManager ) {
            try{
                contractDao.saveContractManager(contractManager);
                return true;
             }
            catch (Exception)
            {
                return false;
                throw;
              
                
            }
          
        }
        public bool updateContractManager( ContractManager contractManager )
        {
            try
            {
                contractDao.updateContractManager(contractManager);
                return true;
            }
            catch (Exception)
            {                
                throw;
            }
        }

        public bool delContractManager( int contractId) {
            try
            {
                contractDao.delContractManager(contractId);
                return true;
            }
            catch (Exception)
            {
                 throw;                
            }
        }
        public PageModel<ContractManager> findAllContractManager(DateTime begin_time,DateTime end_time,ContractManager contractManagert, int start, int count)
        {
            return Dao.findAllContractManager(begin_time,end_time,contractManagert,start ,count );
        }

        public ContractManager findContractManager(int ContractId )
        {
            return contractDao.Get(ContractId);
        }
    }
}
